import request from '@/utils/request1'

// 根据Id查询合同项目信息
export function findProjectById(params) {
  return request({
    url: '/contractPerformance/findId',
    method: 'POST',
    params
  })
}

// 修改合同项目信息
export function updateProject(data, onUploadProgress) {
  return request({
    url: '/contractPerformance/update',
    method: 'POST',
    onUploadProgress: onUploadProgress,
    data
  })
}

// 删除合同项目
export function delProject(data) {
  return request({
    url: '/contractPerformance/del',
    method: 'POST',
    data
  })
}

// 合同项目列表
export function getListProject(params) {
  return request({
    url: '/contractPerformance/selectPage',
    method: 'POST',
    params
  })
}

// 新增合同项目
export function addProject(data) {
  return request({
    url: '/contractPerformance/add',
    method: 'post',
    data
  })
}

// 模糊查询团队下拉信息
export function selectTeam(params) {
  return request({
    url: '/administrative/teams/getTeamIdAndNameListByName',
    method: 'post',
    params
  })
}

// 删除项目资料  修改项目资料
export function updateProjectInfo(data, onUploadProgress) {
  return request({
    url: '/projectInfo/updateProjectInfo',
    method: 'post',
    onUploadProgress: onUploadProgress,
    data
  })
}

// 根据Id获取项目资料信息
export function findProjectInfoById(params) {
  return request({
    url: '/projectInfo/findInfoById',
    method: 'post',
    params
  })
}

// 新增资料
export function addProjectInfo(data) {
  return request({
    url: '/projectInfo/addProjectInfo',
    method: 'post',
    data
  })
}

// 项目资料列表
export function getProjectInfoList(params) {
  return request({
    url: '/projectInfo/getListProjectInfoByParam',
    method: 'post',
    params
  })
}

// 项目资料类型下拉列表
export function getTypeByUseType(params) {
  return request({
    url: '/administrative/infoType/getTypeByUseType',
    method: 'post',
    params
  })
}

// 查询全部父级分类的接口
export function getParentProfessionList() {
  return request({
    url: '/professions/getParentProfessionList',
    method: 'post'
  })
}

// 专业1 2级分类获取查询
export function selectProfessions() {
  return request({
    url: '/administrative/records/selectProfessions',
    method: 'POST'
  })
}

// 专业院所-项目信息
export function getListInstitudeProject(params) {
  return request({
    url: '/technology/design/institude/project/selectPage',
    method: 'post',
    params
  })
}

// 专业院所-项目信息-项目分配
export function getProjectUsersName(params) {
  return request({
    url: '/technology/design/institude/project/usersName',
    method: 'post',
    params
  })
}

// 专业院所-项目信息-项目分配-对应所查询
export function selectProjectUsersName(params) {
  return request({
    url: '/technology/design/institude/project/selectUsersName',
    method: 'post',
    params
  })
}

// 专业院所-项目信息-项目分配修改
export function updateProjectUsersName(params) {
  return request({
    url: '/technology/design/institude/project/update',
    method: 'post',
    params
  })
}

// 专业院所-项目信息-pp到账时间修改
export function updateTime(data) {
  return request({
    url: '/phasePay/update/time',
    method: 'post',
    data
  })
}

// 查询合同数据重复
export function findRepeatProject(data) {
  return request({
    url: '/project/findRepeatProject',
    method: 'post',
    data
  })
}

// 单条接口
export function selectProject(params) {
  return request({
    url: '/project/findId',
    method: 'post',
    params
  })
}

// 根据首页参数查询合同项目
export function getListProjectByHome(params) {
  return request({
    url: '/project/getListProjectByHome',
    method: 'post',
    params
  })
}

// 验收报告分页
export function getAttachList(params) {
  return request({
    url: '/projectInfo/getAttachList',
    method: 'post',
    params
  })
}

// 验收报告删除
export function delAttach(data) {
  return request({
    url: '/projectInfo/del',
    method: 'post',
    data
  })
}

// 合同编号查询
export function findByCode(params) {
  return request({
    url: '/project/findByCode',
    method: 'post',
    params
  })
}

export function selectByProject(params) {
  return request({
    url: '/contractPerformance/selectByProject',
    method: 'post',
    params
  })
}

